﻿<?xml version="1.0" encoding="utf-8" ?>
<AdoNetDataAccess connection="$ArticleDBConnection$"  formatter="bizobj of CompanyLimits; merged into limits">
	<Sql>
		SELECT COUNT(Articles.id) AS currentArticleCount,ISNULL(l.limit,0) as maxTotalArticles,ISNULL(l.size,0) as maxTotalArticleSize,@id as id
		FROM  Articles INNER JOIN
		ArticleLimit l ON l.id=Articles.companyId
		WHERE companyId=@id GROUP BY l.limit,l.size
	</Sql>
	<Param name="id" type="UniqueIdentifier" />
</AdoNetDataAccess>